function getUserList (params) {
    return $axios({
        url: '/user/page',
        method: 'get',
        params
    })
}

// 修改---启用禁用接口
function enableOrDisableEmployee (params) {
    return $axios({
        url: '/user/update',
        method: 'put',
        data: { ...params }
    })
}

// 新增---添加用户
function addUser (params) {
    return $axios({
        url: '/user',
        method: 'post',
        data: { ...params }
    })
}

// 修改---添加用户
function editUser (params) {
    return $axios({
        url: '/user/update',
        method: 'put',
        data: { ...params }
    })
}

// 修改页面反查详情接口
function queryUserById (id) {
    return $axios({
        url: `/user/${id}`,
        method: 'get'
    })
}

// 删除---删除用户
function deleteById(id){
    return $axios({
        url: '/user',
        method: 'delete',
        params: {id}
    })
}

//权限--修改权限
function authorizeById(id,name){
    return $axios({
        url: '/authorize',
        method: 'post',
        data: {
            id: id,
            name: name
        }
    })
}

//修改--修改密码
function revisePassword(oldPassword,newPassword,newPasswordAgain){
    return $axios({
        url: '/user/revisePassword',
        method: 'post',
        data: {
            oldPassword: oldPassword,
            newPassword: newPassword,
            newPasswordAgain: newPasswordAgain
        }
    })
}
